USE [aspnetdb]
GO

-- =============================================
-- Author     :		Anamika Mukherji
-- Create date:       
-- =============================================

create procedure sp_GetManagerID(
@par_deptID nchar(100))
AS
Begin

select user1_name from User1 where User1_id in
((select user1_id from User1_Dept where dept_id = @par_deptID)
intersect
(select user1_id from User1 where role_id = 5))
end